#ifndef PAGEVERSION_H
#define PAGEVERSION_H

#include <QWidget>
#include <QTableWidget>
#include <QHeaderView>
#include "global_def.h"

#define ROWSONEPAGE 25

namespace Ui {
class PageVersion;
}

class PageVersion : public QWidget
{
    Q_OBJECT

public:
    explicit PageVersion(QWidget *parent = nullptr);
    ~PageVersion();
    enum
    {
        Ver_VCU,
        Ver_VSCU,
        Ver_DDUL,
        Ver_DDUR,
        Ver_EVR,
        Ver_RIOM10,
        Ver_CS1,
        Ver_CS2,
        Ver_FCU,
        Ver_ECR,
        Ver_ACE,
        Ver_TCDS,
        Ver_LCUCOM,
        Ver_LCUCTL,
        Ver_PCE,
        Ver_HVAC,
        Ver_EDCU1,
        Ver_EDCU2,
        Ver_EDCU3,
        Ver_EDCU4,
        Ver_EDCU5,
        Ver_EDCU6,
        Ver_EDCU7,
        Ver_EDCU8,
        Ver_PIC,
        Ver_BCU,
        Ver_BMS,
        Ver_ICDS,
        Ver_ATPSW,
        Ver_ATOSW,
        Ver_AOMSW,
        Ver_ATPData,
        Ver_ATOData,
        Ver_Cnt
    };
    void setDevVersion(int dev,int index,uint ver,uint8_t bitcnts,const QString &format,bool xfilled_zero=false,int display_mode=DEC_Display);
signals:
    void returnToMaintMenu();
private slots:
    void on_BtnPre_pressed();
    void on_BtnNext_pressed();
    void on_Btn_Return_clicked();
private:
    Ui::PageVersion *ui;
    QStringList m_lVersionNameList;
    QStringList m_lVersionHeader;
    QList<QTableWidget*> m_lVersionTable;
    int m_ntableRowCount, m_ntableColumnCount;
private:
    void InitVersionTable();
};

#endif // PAGEVERSION_H
